package ru.beta2.testyard.config.defaults;

import ru.beta2.testyard.config.TaggedHandler;

/**
 * Default {@link ru.beta2.testyard.config.TaggedHandler} implementation based on {@link TaggedObject} interface.
 * <br/>
 * User: Inc
 * Date: 18.01.2009
 * Time: 14:48:09
 */
public class DefaultTaggedHandler implements TaggedHandler
{
    public boolean isTagged(Object object)
    {
        return object instanceof TaggedObject;
    }

    public int getTag(Object object)
    {
        return ((TaggedObject) object).getTag();
    }

    public void setTag(Object object, int tag)
    {
        ((TaggedObject) object).setTag(tag);
    }
}
